package com.lotterymanage.dao.impl;

import org.springframework.stereotype.Repository;

import com.lotterymanage.dao.SystemDao;
import com.lotterymanage.domain.SystemIP;

/**
 * 系统IP dao实现类.
 * @author zhangbin
 * @date Apr 20, 2010
 */
@Repository("systemDao")
public class SystemDaoImpl extends AbstractDaoImpl implements SystemDao {

    /**
     * 保存ip.
     * @param systemIP SystemIP
     */
    public void saveCheckIP(final SystemIP systemIP) {
        this.getSqlMapClientTemplate().update("UPDATE-CHECK-IP", systemIP);
    }

    /**
     * 获取IP.
     * @return systemIP
     */
    @SuppressWarnings("unchecked")
    public SystemIP getCheckIP() {
        return (SystemIP) this.getSqlMapClientTemplate().queryForObject("SELECT-CHECK-IP");
    }

}
